package com.whfc.safety.dao;

import com.whfc.safety.entity.SafetyCheckStatisticsDay;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author qzexing
 * @version 1.0
 * @date 2021/11/18 18:13
 */
@Repository
public interface SafetyCheckStatisticsDayMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SafetyCheckStatisticsDay record);

    int insertSelective(SafetyCheckStatisticsDay record);

    SafetyCheckStatisticsDay selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SafetyCheckStatisticsDay record);

    int updateByPrimaryKey(SafetyCheckStatisticsDay record);

    /**
     * 根据组织机构
     *
     * @param deptId
     * @param date
     * @return
     */
    SafetyCheckStatisticsDay selectByDeptIdAndDate(@Param("deptId") Integer deptId, @Param("date") Date date);

    /**
     * 批量保存统计数据
     *
     * @param statisticsDayList 检查情况天统计
     */
    void batchInsert(@Param("statisticsDayList") List<SafetyCheckStatisticsDay> statisticsDayList);
}